<template>
    <h2 class="title" :style="{marginTop:marginTop}">{{title}}</h2>
</template>
<script>
export default {
    props: ["title", "mt"],
    data() {
        return {
            marginTop: ""
        };
    },
    created() {
        this.marginTop = Number(this.mt) >= 0 ? this.mt : "20" + "px";
    }
};
</script>
<style scoped>
.title {
    margin: 20px 0;
}
</style>